Profiling methods have been used in computer systems. For example, the following profiling method is known (for example, refer to Japanese Laid-open Patent Publication No. 2007-272692). In the method, a target range assignment interface receives the assignment of an information collection target range from an application program and registers the assignment in a flag management table, and a flag setting interface receives a flag value from the application program and sets the flag value in the flag management table. An interrupt handler records a flag value at that time of the flag management table with an execution address in an interrupt handler record table when the execution address during the occurrence of an interrupt corresponds to any of the information collection target ranges registered in the flag management table.
However, typical profiling methods have problems including following. In an operating system (hereinafter referred to as OS), a profiling target program and a program for profiling the target program are activated as different processes, and a value of a program counter is acquired by generating a system interrupt using a system call for a process monitoring. An interval of a system interrupt is a minimum interrupt time of a system timer. This minimum interrupt time is 10 ms in UNIX (a registered trade mark of The Open Group) and Linux (a trade mark of Linus Torvalds). The system timer consumes a time for system processing. Thus, when a profiling is performed by a minimum interrupt time of the system timer, detailed profile information for each command may not be acquired, although profile information for each function may be acquired.
When multiple processes are executed concurrently in an OS with a virtual storage mechanism and a value of a program counter is acquired, profiling target processes and processes not to be profiled may not be distinguished. Accordingly, acquired profile information includes not only profile information for profiling target programs but also the profile information for programs not to be profiled. In other words, profiling information only for profiling target programs may not be acquired. This applies to a shared library executed among multiple processes and profile information for the shared library executed only by profiling target processes may not be acquired.